package com.zhida.jiyangcenter.api

import chooongg.base.manager.app
import chooongg.http.HttpManager
import com.vehicle.inspection.api.BaseTokenInterceptor
import com.zhida.jiyangcenter.utils.SP
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

interface APIMemberApps {
    companion object {
        fun service() =
            HttpManager.create(app.applicationContext, "http://beauty.hebzd.com/api/member_apps/") {
                addConverterFactory(GsonConverterFactory.create())
                addInterceptor("member_apps", BaseTokenInterceptor())
            }.getAPI(APIMemberApps::class.java)
    }

    /**
     *
     */
    @POST("member_center")
    suspend fun memberCenter(): NetResponse<ArrayList<MemberCenterEntity>>

    /**
     *
     */
    @POST("pay_card")
    @FormUrlEncoded
    suspend fun payCard(@Field("card_id") card_id: String): NetResponse<PayCardEntity>

    /**
     *
     */
    @POST("recharg")
    @FormUrlEncoded
    suspend fun recharg(@Field("money") money: Int): NetResponse<RechargeEntity>

    /**
     *
     */
    @POST("balance")
    suspend fun balance(): NetResponse<BalanceEntity>


}

